﻿@model MVCSoict.Models.User

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Create</h2>

@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>User</h4>
        <hr />
        @Html.ValidationSummary(true)

        <div class="form-group">
            @Html.LabelFor(model => model.username, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.username)
                @Html.ValidationMessageFor(model => model.username)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.password, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.password)
                @Html.ValidationMessageFor(model => model.password)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.name, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.name)
                @Html.ValidationMessageFor(model => model.name)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.room, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.room)
                @Html.ValidationMessageFor(model => model.room)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.email, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.email)
                @Html.ValidationMessageFor(model => model.email)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.phone, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.phone)
                @Html.ValidationMessageFor(model => model.phone)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.fax, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.fax)
                @Html.ValidationMessageFor(model => model.fax)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.avartar, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.avartar)
                @Html.ValidationMessageFor(model => model.avartar)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.student, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.student)
                @Html.ValidationMessageFor(model => model.student)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.state, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.state)
                @Html.ValidationMessageFor(model => model.state)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.details, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.details)
                @Html.ValidationMessageFor(model => model.details)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
